package cn.technology.forum.service;

import cn.technology.forum.dto.PaginationDTO;
import cn.technology.forum.dto.ResultDTO;
import cn.technology.forum.dto.UserDTO;
import cn.technology.forum.dto.UserQueryDTO;
import cn.technology.forum.model.User;
import cn.technology.forum.model.UserAccount;
import cn.technology.forum.model.UserExample;
import cn.technology.forum.model.UserInfo;
import cn.technology.forum.vo.UserShow;
import org.springframework.stereotype.Service;

@Service
public interface UserService {


     User selectUserByExample(UserExample userExample);

     ResultDTO repass(Long user_id,String nowpass,String pass);

     User createOrUpdate(User user);

     int createOrUpdateWeibo(User user, UserDTO loginuser, UserInfo userInfo);


     int createOrUpdateBaidu(User user, UserDTO loginuser, UserInfo userInfo);

     void createNewBaidu(User user,UserInfo userInfo);

     String getUserName(String authorizeSize);

     User selectUserByUserId(String userId);

     User selectUserByUserId(Long userId);

     Object updateUserMailById(String userId,String mail);

     int updateAvatarById(Long userId,String url);

     int updateUsernameById(Long userId,String username);

     UserDTO getUserDTO(User user);

     UserShow getUserShow(User user);

     UserDTO getUserDTO(Long id);

     Object registerOrLoginWithMail(String mail,String password);

     Object updateUserPhoneById(Long userId, String phone);

     Object registerOrLoginWithPhone(String phone,String password);

     int createOrUpdateQq(User user, UserDTO loginuser, UserInfo userInfo);

     UserAccount initUserAccount(UserAccount userAccount);

     void initUserTable(User user,UserInfo userInfo);

     void updateUserInfo(User user,User updateUser,UserDTO loginuser,UserInfo userInfo);

     Object login(Integer type, String name, String password);

     Object register(Integer type, String name, String password);

     PaginationDTO list(UserQueryDTO userQueryDTO);
}
